package com.xnew.file.mapper;

import com.xnew.bean.common.FileInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.shiro.authz.annotation.RequiresRoles;

import java.util.List;

/**
 * @version V1.0
 * @ClassName: FileCommonMapper
 * @Description: 附件操作类
 * @author: yangcd
 * @date:2020/12/30 10:23
 */
@Mapper
public interface FileCommonMapper {

    void saveFileInfo(FileInfo fileInfo) throws Exception;

    List<FileInfo> selectAllBusinessFile(@Param("businessType") String businessType, @Param("businessId") String businessId) throws Exception;

    void deleteFileByFilePath(@Param("filePath") String filePath) throws Exception;

    void deleteFileByBusiness(@Param("businessType") String businessType, @Param("businessId") String businessId);

    List<FileInfo> selectByIds(String ids);

    void deleteFileByBusinessId( @Param("businessId") String businessId) throws Exception;

    List<FileInfo> queryFileListByBusinessId( @Param("businessId") String businessId) throws Exception;
}
